package com.linked.goods.goodsbase.service.impl;

import com.linked.goods.goodsbase.bean.po.GoodsInfoPO;
import com.linked.goods.goodsbase.mapper.IGoodsInfoMapper;
import com.linked.goods.goodsbase.service.IGoodsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author :dbq
 * @date : 2023/1/28 10:04
 * @description : desc
 */
@Service
@Slf4j
public class GoodsServiceImpl implements IGoodsService {

    private final IGoodsInfoMapper goodsInfoMapper;

    @Autowired
    public GoodsServiceImpl(IGoodsInfoMapper goodsInfoMapper) {
        this.goodsInfoMapper = goodsInfoMapper;
    }

    @Override
    public boolean saveGoodsBaseInfo(GoodsInfoPO goodsBaseInfo) throws Exception {
        return goodsInfoMapper.insert(goodsBaseInfo) > 0;
    }
}
